export default function Loading({ text = '加载中...' }: { text?: string }) {
  return (
    <div className="flex min-h-32 items-center justify-center">
      <svg
        className="mr-3 size-10 animate-spin text-blue-500"
        viewBox="0 0 40 40"
      >
        <circle
          className="opacity-25"
          cx="20"
          cy="20"
          r="16"
          stroke="currentColor"
          strokeWidth="6"
          fill="none"
        />
        <path
          className="opacity-75"
          fill="currentColor"
          d="M8 20a12 12 0 0112-12v6a6 6 0 00-6 6H8z"
        />
      </svg>
      <span className="select-none text-sm text-blue-500">{text}</span>
    </div>
  )
}
